import { FC, useEffect } from 'react';
import SimpleList from '@/components/SimpleList';
import { useModel } from 'umi';
const columns: any[] = [
  {
    title: '专利名称',
    dataIndex: 'T001',
    width: 138,
  },
  {
    title: '申请号',
    dataIndex: 'T002',
    width: 140,
  },
  {
    title: '申请日期',
    dataIndex: 'T003',
    width: 160,
  },
  {
    title: '申请(专利权)人',
    dataIndex: 'T004',
    width: 160,
  },
  {
    title: '发明(设计)人',
    dataIndex: 'T005',
    width: 160,
  },
  {
    title: '类型',
    dataIndex: 'T006',
    width: 120,
  },
  {
    title: '分类号',
    dataIndex: 'T007',
    width: 120,
  },
];

const PatentCopyright: FC = () => {
  const { patent, getPatent } = useModel('company');
  useEffect(() => {
    const id = window.sessionStorage.getItem('companyId') || '';
    getPatent({ id });
  }, []);
  return (
    <SimpleList
      width={848}
      height={220}
      columns={columns}
      dataSource={patent}
      headerStyle={{
        height: 42,
        backgroundColor: 'rgba(141, 141, 141, 0.1)',
      }}
      rowStyle={{
        height: 42,
      }}
      sortStyle={{
        width: 88,
      }}
      hover
      odd
      rowBackground
    />
  );
};
export default PatentCopyright;
